import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AccountManageComponent } from './pages/account-manage/account-manage.component';
import { AccountDetailComponent } from './pages/account-detail/account-detail.component';
import { DistrictManageComponent } from './pages/district-manage/district-manage.component';
import { OnlineUserComponent } from './pages/online-user/online-user.component';
import { ModalComponent } from './pages/district-manage/modal.component';

const routes: Routes = [
    {
        path: 'account', component: AccountManageComponent, data: {
            breadcrumbs: [{ title: '企业管理' }]
        },
        children: [
            {
                path: 'detail', component: AccountDetailComponent, data: {
                    breadcrumbs: [{ title: '管理', path: '/manage/account' }, { title: '新增企业' }]
                }
            },
            {
                path: 'detail/:id', component: AccountDetailComponent, data: {
                    breadcrumbs: [{ title: '管理', path: '/manage/account' }, { title: '企业详情' }]
                }
            },
        ]

    },
    {
        path: 'district', component: DistrictManageComponent, data: {
            breadcrumbs: [{ title: '管理', path: '/manage/district' }, { title: '区域管理' }]
        }
    },
    {
        path: 'OnlineUserComponent', component: OnlineUserComponent, data: {
            breadcrumbs: [{ title: '管理', path: '/manage/OnlineUserComponent' }, { title: '区域管理' }]
        }
    }
];

export const declarationComponents = [
    AccountManageComponent,
    AccountDetailComponent,
    DistrictManageComponent,
    OnlineUserComponent,
    ModalComponent
];

export const entryComponents = [
    // AccountManageComponent,
    // AccountDetailComponent,
    // DistrictManageComponent,
    ModalComponent
];

@NgModule({
    imports: [
        RouterModule.forChild(routes)
    ],
    exports: [
        RouterModule
    ]
})
export class ManageRoutingModule { }
